home *** CD-ROM | disk | FTP | other *** search
/ Aminet 52 / Aminet 52 (2002)(GTI - Schatztruhe)[!][Dec 2002].iso / Aminet / game / patch / WHDIGamesS-T.lzh / SuperStarDust.lha / SuperStarDustHD / Install-SuperStardust < prev    next >
Text File  |  2001-01-24  |  4KB  |  187 lines

  1. ;****************************
  2.  
  3. (set #readme-file "README")    ;name of readme file
  4. (set #cleanup "")        ;files to delete after install
  5. (set #last-file "Disk.5")    ;last file the imager should create
  6.  
  7. ;****************************
  8. ;----------------------------
  9. ; checks if given program is installed, if not abort install
  10. ; #program - to check
  11.  
  12. (procedure P_ChkRun
  13.   (if
  14.     (= 0 (run ("cd SYS:\nWhich %s" #program)))
  15.     ("")
  16.     (abort
  17.       (cat
  18.     "You must install \"" #program "\" first!\n"
  19.     "It must be accessible via the path.\n"
  20.     "You can find it in the WHDLoad package."
  21.       )
  22.     )
  23.   )
  24. )
  25.  
  26. ;****************************
  27.  
  28. (if
  29.   (exists #readme-file)
  30.   (if
  31.     (= 0 (run ("SYS:Utilities/Multiview %s" #readme-file)))
  32.     ("")
  33.     (run ("SYS:Utilities/More %s" #readme-file))
  34.   )
  35. )
  36.  
  37. (set #program "WHDLoad")
  38. (P_ChkRun)
  39.  
  40. (set #program "RawDIC")
  41. (P_ChkRun)
  42.  
  43. (if
  44.   (= @user-level 2)
  45.   (
  46.     (set #CI_drive
  47.       (askchoice
  48.     (prompt "Select source drive for diskimages")
  49.     (default 0)
  50.     (choices "DF0:" "DF1:" "DF2:" "DF3:")
  51.     (help @askchoice-help)
  52.       )
  53.     )
  54.     (select #CI_drive
  55.       (set #CI_drive "DF0:")
  56.       (set #CI_drive "DF1:")
  57.       (set #CI_drive "DF2:")
  58.       (set #CI_drive "DF3:")
  59.     )
  60.     (set #ignore " IGNOREERRORS")
  61.   )
  62.   (set #CI_drive "DF0:")
  63.   (set #ignore "")
  64. )
  65.  
  66. (set @default-dest
  67.   (askdir
  68.     (prompt ("Where should \"%s\" be installed?\nA drawer \"%s\" will be automatically created." @app-name @app-name))
  69.     (help @askdir-help)
  70.     (default @default-dest)
  71.     (disk)
  72.   )
  73. )
  74. (set #dest (tackon @default-dest @app-name))
  75. (if
  76.   (exists #dest)
  77.   (
  78.     (set #choice
  79.       (askbool
  80.         (prompt ("\nDirectory \"%s\" already exists.\n Should it be deleted?" #dest))
  81.         (default 1)
  82.         (choices "Delete" "Skip")
  83.         (help @askbool-help)
  84.       )
  85.     )
  86.     (if
  87.       (= #choice 1)
  88.       (run ("Delete \"%s\" \"%s.info\" All" #dest #dest))
  89.     )
  90.   )
  91. )
  92. (makedir #dest
  93.   (help @makedir-help)
  94.   (infos)
  95. )
  96.  
  97. ;----------------------------
  98.  
  99. (if
  100.   (exists ("%s.newicon" @app-name))
  101.   (set #icon
  102.     (askchoice
  103.       (prompt "\nWhich icon would you like to install?\n")
  104.       (default 0)
  105.       (choices "Color Icon [160x128] 256 col" "Color Icon [160x67] 128 col"
  106.                "Color Icon (Cover) [120x154] 256 col" "NewIcon (Cover) [73x93] 256 col")
  107.       (help @askchoice-help)
  108.     )
  109.   )
  110.   (set #icon 0)
  111. )
  112. (select #icon
  113.   (set #icon ("%s.coloricon" @app-name))
  114.   (set #icon ("%s.coloricon1" @app-name))
  115.   (set #icon ("%s.coloricon2" @app-name))
  116.   (set #icon ("%s.newicon" @app-name))
  117. )
  118. (copyfiles
  119.   (help @copyfiles-help)
  120.   (source #icon)
  121.   (newname ("%s.info" @app-name))
  122.   (dest #dest)
  123. )
  124. (copyfiles
  125.   (help @copyfiles-help)
  126.   (source ("%s.Slave" @app-name ))
  127.   (dest #dest)
  128. )
  129. (if
  130.   (exists #readme-file)
  131.   (copyfiles
  132.     (help @copyfiles-help)
  133.     (source #readme-file)
  134.     (dest #dest)
  135.   )
  136. )
  137. (if
  138.   (exists ("%s.info" #readme-file))
  139.   (copyfiles
  140.     (help @copyfiles-help)
  141.     (source ("%s.info" #readme-file))
  142.     (dest #dest)
  143.   )
  144. )
  145.  
  146. (copyfiles
  147.   (help @copyfiles-help)
  148.   (source ("%s.islave" @app-name))
  149.   (dest #dest)
  150. )
  151.  
  152. (copyfiles
  153.   (help @copyfiles-help)
  154.   (source ("blk" @app-name))
  155.   (dest #dest)
  156. )
  157.  
  158. (working)
  159. (run ("CD \"%s\"\nRawDIC SLAVE=%s.islave SOURCE=%s%s\nDelete %s.islave" #dest @app-name #CI_drive #ignore @app-name))
  160.  
  161. (if
  162.   (exists (tackon #dest #last-file))
  163.   ("")
  164.   (abort "Diskimaging was not successful!\nRawDIC was unable to create all needed files!")
  165. )
  166.  
  167. (run ("C:join \"%s/blk\" \"%s/Disk.1\" \"%s/Disk.2\" \"%s/Disk.3\" \"%s/Disk.4\" \"%s/Disk.5\" AS \"%s/ssd_diskdata\" " #dest #dest #dest #dest #dest #dest #dest))
  168.  
  169. (if
  170.   (exists (tackon #dest "ssd_diskdata"))
  171.   ("")
  172.   (abort "Could not join disks image!")
  173. )
  174.  
  175. (run ("Delete \"%s/blk\" QUIET FORCE" #dest))
  176. (run ("Delete \"%s/Disk.1\" QUIET FORCE" #dest))
  177. (run ("Delete \"%s/Disk.2\" QUIET FORCE" #dest))
  178. (run ("Delete \"%s/Disk.3\" QUIET FORCE" #dest))
  179. (run ("Delete \"%s/Disk.4\" QUIET FORCE" #dest))
  180. (run ("Delete \"%s/Disk.5\" QUIET FORCE" #dest))
  181.  
  182. ;----------------------------
  183.  
  184. (run ("Delete %s ALL QUIET FORCE" #cleanup))    ;delete temporary files
  185.  
  186. (exit)
  187.